//
// Decompiled with: Decompiler.NET, Version=1.3.1.18439, Culture=neutral, PublicKeyToken=null, Version: 1.3.1.18439
// Decompilation Started at: 3/15/2009 10:34:26 PM
// Copyright 2003 - 2004, Jungle Creatures, Inc., All Rights Reserved. 
// Written by Jonathan Pierce, Email: support@junglecreatures.com
//

namespace PatientManagement

{
		
		#region Namespace Import Declarations
		
			using System.ComponentModel;
			using System.Data.Common;
			using System.Data;
			using System.Data.SqlClient;
			using System.Drawing;
			using System;
			using System.Resources;
			using System.Windows.Forms;
			
		#endregion
		
	public class frmBenhAnChuaTinhTien : Form
	
	{
		
		#region Fields
			private BindingManagerBase bmb;
			private Button btExit;
			private Button btFirst;
			private Button btLast;
			private Button btSearch;
			public string CanNang;
			public string clr;
			public string clrISN;
			private IContainer components;
			private string connStr;
			private DataGrid dataGrid1;
			private DataGrid dataGrid2;
			public string DiaChi;
			public string DienThoai;
			private DataSet ds;
			private DataSet dsStyle;
			public int flag;
			public string GioiTinh;
			public string HuyetAp;
			public string ID;
			private int index;
			public string ISN;
			private Label label2;
			private Label label3;
			public string Mach;
			public string NgaySinh;
			public string NgheNghiep;
			public string NhanBiet;
			public string NhietDo;
			public string patID;
			public string patName;
			private RadioButton rbAll;
			private RadioButton rbID;
			private RadioButton rbTenBenhNhan;
			private TabPage tbCapNhatHoaDon;
			private TabControl tbControl;
			private TextBox tbGoTo;
			private TabPage tbHoaDon;
			private TextBox tbKeySearch;
			public string Ten;
			private ToolTip toolTip1;
			public string Tuoi;
		#endregion
		
		#region Constructors
		
			public frmBenhAnChuaTinhTien ()
			
			{
				this.flag = 1;
				this.index = -1;
				this.InitializeComponent ();
				this.connStr = Connection.ConnectionString ();
				return;
			}
			
		#endregion
		
		#region Methods
		
			private void btExit_Click (object sender, EventArgs e)
			
			{
				base.Close ();
				return;
			}
			
			private void btFirst_Click (object sender, EventArgs e)
			
			{
				this.bmb.Position = 0;
				return;
			}
			
			private void btLast_Click (object sender, EventArgs e)
			
			{
				DataSet theDataSet;
				DataSet theDataSet2;
				if (this.tbControl.SelectedIndex != 0)
				{
					goto L_0043;
				}
				theDataSet = ((DataSet) this.dataGrid1.DataSource);
				this.bmb.Position = (theDataSet.Tables[0].Rows.Count - 1);
				goto L_0077;
				
			L_0043:
				
				{
				}
				theDataSet2 = ((DataSet) this.dataGrid2.DataSource);
				this.bmb.Position = (theDataSet2.Tables[0].Rows.Count - 1);
				
			L_0077:
				return;
			}
			
			private void btSearch_Click (object sender, EventArgs e)
			
			{
				string theString;
				SqlDataAdapter theSqlDataAdapter;
				DataSet theDataSet;
				SqlDataAdapter theSqlDataAdapter2;
				SqlDataAdapter theSqlDataAdapter3;
				SqlDataAdapter theSqlDataAdapter4;
				theString = string.Empty;
				if (this.tbControl.SelectedIndex != 0)
				{
					goto L_0246;
				}
				if (! this.rbAll.Checked)
				{
					goto L_00E3;
				}
				theSqlDataAdapter = new SqlDataAdapter ("Select * from  vw_NursePayment Where invPaymentStatus = 1", this.connStr);
				theDataSet = new DataSet ();
				int i = theSqlDataAdapter.Fill (theDataSet, "vw_NursePayment");
				theSqlDataAdapter.Dispose ();
				if ((theDataSet != null) && ((theDataSet.Tables.Count != 0) && (theDataSet.Tables[0].Rows.Count != 0)))
				{
					goto L_0099;
				}
				
			L_0078:
				
				{
				}
				this.dataGrid1.TableStyles.Clear ();
				this.dataGrid1.DataSource = null;
				goto L_0497;
				
			L_0099:
				
				{
				}
				this.dataGrid1.TableStyles.Clear ();
				this.dataGrid1.DataSource = null;
				this.dataGrid1.DataSource = theDataSet;
				this.dataGrid1.SetDataBinding (theDataSet, "vw_NursePayment");
				this.loadDataGrid (this.dataGrid1);
				goto L_0241;
				
			L_00E3:
				
				{
				}
				if (this.tbKeySearch.Text != "")
				{
					goto L_0112;
				}
				DialogResult theDialogResult = MessageBox.Show ("Vui l?ng nh?p t? kho? ?? t?m ki?m!", "L?i t?m ki?m", MessageBoxButtons.OK, MessageBoxIcon.Hand);
				goto L_0497;
				
			L_0112:
				
				{
				}
				if (! this.rbID.Checked)
				{
					goto L_013C;
				}
				theString = string.Concat ("Select * from  vw_NursePayment Where patID=\'", this.tbKeySearch.Text, "\' and invPaymentStatus = 1");
				goto L_0157;
				
			L_013C:
				
				{
				}
				theString = string.Concat ("Select * from  vw_NursePayment Where patName like N\'%", this.tbKeySearch.Text, "%\' and invPaymentStatus = 1");
				
			L_0157:
				
				{
				}
				theSqlDataAdapter2 = new SqlDataAdapter (theString, this.connStr);
				this.dsStyle = new DataSet ();
				int i2 = theSqlDataAdapter2.Fill (this.dsStyle, "vw_NursePayment");
				theSqlDataAdapter2.Dispose ();
				if ((this.dsStyle != null) && ((this.dsStyle.Tables.Count != 0) && (this.dsStyle.Tables[0].Rows.Count != 0)))
				{
					goto L_01F2;
				}
				
			L_01BE:
				
				{
				}
				this.dataGrid1.TableStyles.Clear ();
				this.dataGrid1.DataSource = null;
				DialogResult theDialogResult2 = MessageBox.Show ("Kh?ng t?m th?y b?nh nh?n ", "Th?ng B?o", MessageBoxButtons.OK, MessageBoxIcon.Hand);
				goto L_0497;
				
			L_01F2:
				
				{
				}
				this.dataGrid1.DataSource = this.dsStyle;
				this.dataGrid1.SetDataBinding (this.dsStyle, "vw_NursePayment");
				this.dataGrid1.ReadOnly = true;
				this.dataGrid1.TableStyles.Clear ();
				this.loadDataGrid (this.dataGrid1);
				
			L_0241:
				
				{
				}
				goto L_0497;
				
			L_0246:
				
				{
				}
				if (! this.rbAll.Checked)
				{
					goto L_0339;
				}
				theSqlDataAdapter3 = new SqlDataAdapter ("Select * from  vw_NursePayment Where invPaymentStatus = 0", this.connStr);
				this.ds = new DataSet ();
				int i3 = theSqlDataAdapter3.Fill (this.ds, "vw_NursePayment");
				theSqlDataAdapter3.Dispose ();
				if ((this.ds != null) && ((this.ds.Tables.Count != 0) && (this.ds.Tables[0].Rows.Count != 0)))
				{
					goto L_02E5;
				}
				
			L_02C4:
				
				{
				}
				this.dataGrid2.TableStyles.Clear ();
				this.dataGrid2.DataSource = null;
				goto L_0497;
				
			L_02E5:
				
				{
				}
				this.dataGrid2.TableStyles.Clear ();
				this.dataGrid2.DataSource = null;
				this.dataGrid2.DataSource = this.ds;
				this.dataGrid2.SetDataBinding (this.ds, "vw_NursePayment");
				this.loadDataGrid (this.dataGrid2);
				goto L_0497;
				
			L_0339:
				
				{
				}
				if (this.tbKeySearch.Text != "")
				{
					goto L_0368;
				}
				DialogResult theDialogResult3 = MessageBox.Show ("Vui l?ng nh?p t? kho? ?? t?m ki?m!", "L?i t?m ki?m", MessageBoxButtons.OK, MessageBoxIcon.Hand);
				goto L_0497;
				
			L_0368:
				
				{
				}
				if (! this.rbID.Checked)
				{
					goto L_0392;
				}
				theString = string.Concat ("Select * from  vw_NursePayment Where patID=\'", this.tbKeySearch.Text, "\' and invPaymentStatus = 0");
				goto L_03AD;
				
			L_0392:
				
				{
				}
				theString = string.Concat ("Select * from  vw_NursePayment Where patName like N\'%", this.tbKeySearch.Text, "%\' and invPaymentStatus = 0");
				
			L_03AD:
				
				{
				}
				theSqlDataAdapter4 = new SqlDataAdapter (theString, this.connStr);
				this.dsStyle = new DataSet ();
				int i4 = theSqlDataAdapter4.Fill (this.dsStyle, "vw_NursePayment");
				theSqlDataAdapter4.Dispose ();
				if ((this.dsStyle != null) && ((this.dsStyle.Tables.Count != 0) && (this.dsStyle.Tables[0].Rows.Count != 0)))
				{
					goto L_0448;
				}
				
			L_0417:
				
				{
				}
				this.dataGrid2.TableStyles.Clear ();
				this.dataGrid2.DataSource = null;
				DialogResult theDialogResult4 = MessageBox.Show ("Kh?ng t?m th?y b?nh nh?n", "Th?ng B?o", MessageBoxButtons.OK, MessageBoxIcon.Hand);
				goto L_0497;
				
			L_0448:
				
				{
				}
				this.dataGrid2.TableStyles.Clear ();
				this.dataGrid2.DataSource = null;
				this.dataGrid2.DataSource = this.dsStyle;
				this.dataGrid2.SetDataBinding (this.dsStyle, "vw_NursePayment");
				this.loadDataGrid (this.dataGrid2);
				
			L_0497:
				return;
			}
			
			private void dataGrid1_MouseUp (object sender, MouseEventArgs e)
			
			{
				DataSet theDataSet;
				frmLapHoaDonYTa theFrmLapHoaDonYTa;
				if (this.dataGrid1.DataSource == null)
				{
					goto L_0123;
				}
				
			L_0012:
				
				{
				}
				theDataSet = ((DataSet) this.dataGrid1.DataSource);
				if (MessageBox.Show ("B?n c? mu?n xem h?a ??n c?a b?nh nh?n n?y kh?ng?", "Xem H?a ??n", MessageBoxButtons.YesNo, MessageBoxIcon.Question) != DialogResult.Yes)
				{
					goto L_0123;
				}
				this.clrISN = this.dataGrid1[this.dataGrid1.CurrentRowIndex, 0].ToString ();
				this.patName = this.dataGrid1[this.dataGrid1.CurrentRowIndex, 2].ToString ();
				this.patID = this.dataGrid1[this.dataGrid1.CurrentRowIndex, 1].ToString ();
				this.index = this.dataGrid1.CurrentRowIndex;
				theFrmLapHoaDonYTa = new frmLapHoaDonYTa (this.patID, this.patName, this.clrISN);
				theFrmLapHoaDonYTa.ShowInTaskbar = false;
				DialogResult theDialogResult = theFrmLapHoaDonYTa.ShowDialog (((IWin32Window) this));
				if (! UserInformation.rowUpdated)
				{
					goto L_0123;
				}
				theDataSet.Tables[0].Rows.RemoveAt (this.index);
				this.bmb = this.BindingContext[this.dataGrid1.DataSource, this.dataGrid1.DataMember];
				
			L_0123:
				return;
			}
			
			private void dataGrid2_MouseUp (object sender, MouseEventArgs e)
			
			{
				DataSet theDataSet;
				string theString;
				SqlDataAdapter theSqlDataAdapter;
				DataSet theDataSet2;
				string theString2;
				string theString3;
				string theString4;
				string theString5;
				string theString6;
				frmHoaDonYTa theFrmHoaDonYTa;
				if (this.dataGrid2.DataSource == null)
				{
					goto L_0273;
				}
				
			L_0012:
				
				{
				}
				theDataSet = ((DataSet) this.dataGrid2.DataSource);
				if (MessageBox.Show ("B?n c? mu?n xem l?i h?a ??n c?a b?nh nh?n n?y kh?ng?", "Xem h?a ??n", MessageBoxButtons.YesNo, MessageBoxIcon.Question) != DialogResult.Yes)
				{
					goto L_0273;
				}
				this.ISN = theDataSet.Tables[0].Rows[this.dataGrid2.CurrentRowIndex][1].ToString ();
				theString = theDataSet.Tables[0].Rows[this.dataGrid2.CurrentRowIndex]["clrISN"].ToString ();
				theSqlDataAdapter = new SqlDataAdapter (string.Concat ("SELECT * FROM vw_NursePayment WHERE patID=\'", this.ISN, "\' and clrISN = ", theString), this.connStr);
				theDataSet2 = new DataSet ();
				int i = theSqlDataAdapter.Fill (theDataSet2, "vw_NursePayment");
				this.clrISN = theDataSet2.Tables["vw_NursePayment"].Rows[0]["clrISN"].ToString ();
				this.patName = theDataSet2.Tables["vw_NursePayment"].Rows[0]["patName"].ToString ();
				this.patID = theDataSet2.Tables["vw_NursePayment"].Rows[0]["patID"].ToString ();
				theString2 = theDataSet2.Tables["vw_NursePayment"].Rows[0]["invMedicinePayment"].ToString ();
				theString3 = theDataSet2.Tables["vw_NursePayment"].Rows[0]["invExaminationPayment"].ToString ();
				theString4 = theDataSet2.Tables["vw_NursePayment"].Rows[0]["invMedicineSkillPayment"].ToString ();
				theString5 = theDataSet2.Tables["vw_NursePayment"].Rows[0]["invSurgeryPayment"].ToString ();
				theString6 = theDataSet2.Tables["vw_NursePayment"].Rows[0]["invISN"].ToString ();
				theFrmHoaDonYTa = new frmHoaDonYTa (this.patName, this.patID, this.clrISN, theString2, theString3, theString4, theString5, theString6);
				theFrmHoaDonYTa.ShowInTaskbar = false;
				DialogResult theDialogResult = theFrmHoaDonYTa.ShowDialog (((IWin32Window) this));
				
			L_0273:
				return;
			}
			
			protected override void Dispose (bool disposing)
			
			{
				this.flag = 0;
				if (! disposing)
				{
					goto L_001D;
				}
				if (this.components == null)
				{
					goto L_001D;
				}
				this.components.Dispose ();
				
			L_001D:
				
				{
				}
				base.Dispose (disposing);
				return;
			}
			
			private void frmTimHoSoBenhAn_Load (object sender, EventArgs e)
			
			{
				this.btSearch_Click (sender, e);
				return;
			}
			
			private void InitializeComponent ()
			
			{
				ResourceManager theResourceManager;
				Control[] theControlArray;
				Control[] theControlArray2;
				Control[] theControlArray3;
				Control[] theControlArray4;
				this.components = ((IContainer) new System.ComponentModel.Container ());
				theResourceManager = new ResourceManager (typeof (frmBenhAnChuaTinhTien));
				this.label2 = new Label ();
				this.rbID = new RadioButton ();
				this.rbTenBenhNhan = new RadioButton ();
				this.label3 = new Label ();
				this.tbKeySearch = new TextBox ();
				this.btSearch = new Button ();
				this.btExit = new Button ();
				this.rbAll = new RadioButton ();
				this.btFirst = new Button ();
				this.toolTip1 = new ToolTip (this.components);
				this.btLast = new Button ();
				this.tbGoTo = new TextBox ();
				this.tbControl = new TabControl ();
				this.tbHoaDon = new TabPage ();
				this.dataGrid1 = new DataGrid ();
				this.tbCapNhatHoaDon = new TabPage ();
				this.dataGrid2 = new DataGrid ();
				this.tbControl.SuspendLayout ();
				this.tbHoaDon.SuspendLayout ();
				((ISupportInitialize) this.dataGrid1).BeginInit ();
				this.tbCapNhatHoaDon.SuspendLayout ();
				((ISupportInitialize) this.dataGrid2).BeginInit ();
				base.SuspendLayout ();
				this.label2.Font = new System.Drawing.Font ("Verdana", 9.75F, FontStyle.Bold, GraphicsUnit.Point, ((byte) byte.MinValue));
				this.label2.Location = new Point (192, 19);
				this.label2.Name = "label2";
				this.label2.Size = new System.Drawing.Size (80, 23);
				this.label2.TabIndex = 1;
				this.label2.Text = "T?m theo:";
				this.rbID.Location = new Point (272, 16);
				this.rbID.Name = "rbID";
				this.rbID.TabIndex = 2;
				this.rbID.Text = "S? ID";
				this.rbTenBenhNhan.Location = new Point (344, 16);
				this.rbTenBenhNhan.Name = "rbTenBenhNhan";
				this.rbTenBenhNhan.Size = new System.Drawing.Size (128, 24);
				this.rbTenBenhNhan.TabIndex = 3;
				this.rbTenBenhNhan.Text = "T?n b?nh nh?n";
				this.label3.Location = new Point (201, 50);
				this.label3.Name = "label3";
				this.label3.Size = new System.Drawing.Size (72, 22);
				this.label3.TabIndex = 5;
				this.label3.Text = "T? kho?:";
				this.tbKeySearch.BorderStyle = BorderStyle.FixedSingle;
				this.tbKeySearch.Location = new Point (272, 48);
				this.tbKeySearch.Name = "tbKeySearch";
				this.tbKeySearch.Size = new System.Drawing.Size (184, 23);
				this.tbKeySearch.TabIndex = 6;
				this.tbKeySearch.Text = "";
				this.tbKeySearch.KeyPress += new KeyPressEventHandler (this.tbKeySearch_KeyPress);
				this.btSearch.FlatStyle = FlatStyle.Flat;
				this.btSearch.Location = new Point (464, 48);
				this.btSearch.Name = "btSearch";
				this.btSearch.TabIndex = 7;
				this.btSearch.Text = "T?m";
				this.btSearch.Click += new EventHandler (this.btSearch_Click);
				this.btExit.FlatStyle = FlatStyle.Popup;
				this.btExit.Location = new Point (632, 428);
				this.btExit.Name = "btExit";
				this.btExit.Size = new System.Drawing.Size (88, 23);
				this.btExit.TabIndex = 8;
				this.btExit.Text = "Tho?t";
				this.btExit.Visible = false;
				this.btExit.Click += new EventHandler (this.btExit_Click);
				this.rbAll.Checked = true;
				this.rbAll.Location = new Point (480, 16);
				this.rbAll.Name = "rbAll";
				this.rbAll.Size = new System.Drawing.Size (80, 24);
				this.rbAll.TabIndex = 9;
				this.rbAll.TabStop = true;
				this.rbAll.Text = "T?t c?";
				this.btFirst.FlatStyle = FlatStyle.Popup;
				this.btFirst.Image = ((Image) ((Bitmap) theResourceManager.GetObject ("btFirst.Image")));
				this.btFirst.Location = new Point (16, 432);
				this.btFirst.Name = "btFirst";
				this.btFirst.Size = new System.Drawing.Size (24, 23);
				this.btFirst.TabIndex = 10;
				this.toolTip1.SetToolTip (((Control) this.btFirst), "Di chuy?n ??n m?u tin ??u ti?n");
				this.btFirst.Click += new EventHandler (this.btFirst_Click);
				this.btLast.FlatStyle = FlatStyle.Popup;
				this.btLast.Image = ((Image) ((Bitmap) theResourceManager.GetObject ("btLast.Image")));
				this.btLast.Location = new Point (120, 432);
				this.btLast.Name = "btLast";
				this.btLast.Size = new System.Drawing.Size (24, 23);
				this.btLast.TabIndex = 11;
				this.toolTip1.SetToolTip (((Control) this.btLast), "Di chuy?n ??n m?u tin cu?i c?ng");
				this.btLast.Click += new EventHandler (this.btLast_Click);
				this.tbGoTo.BorderStyle = BorderStyle.FixedSingle;
				this.tbGoTo.Location = new Point (48, 432);
				this.tbGoTo.Name = "tbGoTo";
				this.tbGoTo.Size = new System.Drawing.Size (64, 23);
				this.tbGoTo.TabIndex = 12;
				this.tbGoTo.Text = "";
				this.tbGoTo.TextChanged += new EventHandler (this.tbGoTo_TextChanged);
				theControlArray = new Control[2];
				theControlArray[0] = ((Control) this.tbHoaDon);
				theControlArray[1] = ((Control) this.tbCapNhatHoaDon);
				this.tbControl.Controls.AddRange (theControlArray);
				this.tbControl.Location = new Point (16, 88);
				this.tbControl.Name = "tbControl";
				this.tbControl.SelectedIndex = 0;
				this.tbControl.Size = new System.Drawing.Size (704, 336);
				this.tbControl.TabIndex = 13;
				theControlArray2 = new Control[1];
				theControlArray2[0] = ((Control) this.dataGrid1);
				this.tbHoaDon.Controls.AddRange (theControlArray2);
				this.tbHoaDon.Location = new Point (4, 25);
				this.tbHoaDon.Name = "tbHoaDon";
				this.tbHoaDon.Size = new System.Drawing.Size (696, 307);
				this.tbHoaDon.TabIndex = 0;
				this.tbHoaDon.Text = "L?p H?a ??n ";
				this.dataGrid1.AllowSorting = false;
				this.dataGrid1.BackgroundColor = SystemColors.ActiveCaptionText;
				this.dataGrid1.CaptionBackColor = SystemColors.ActiveCaptionText;
				this.dataGrid1.CaptionVisible = false;
				this.dataGrid1.DataMember = "";
				this.dataGrid1.Dock = DockStyle.Fill;
				this.dataGrid1.HeaderForeColor = SystemColors.ControlText;
				this.dataGrid1.Name = "dataGrid1";
				this.dataGrid1.ReadOnly = true;
				this.dataGrid1.Size = new System.Drawing.Size (696, 307);
				this.dataGrid1.TabIndex = 5;
				this.dataGrid1.MouseUp += new MouseEventHandler (this.dataGrid1_MouseUp);
				theControlArray3 = new Control[1];
				theControlArray3[0] = ((Control) this.dataGrid2);
				this.tbCapNhatHoaDon.Controls.AddRange (theControlArray3);
				this.tbCapNhatHoaDon.Location = new Point (4, 25);
				this.tbCapNhatHoaDon.Name = "tbCapNhatHoaDon";
				this.tbCapNhatHoaDon.Size = new System.Drawing.Size (696, 307);
				this.tbCapNhatHoaDon.TabIndex = 1;
				this.tbCapNhatHoaDon.Text = "C?p Nh?t H?a ??n";
				this.dataGrid2.AllowSorting = false;
				this.dataGrid2.BackgroundColor = SystemColors.ActiveCaptionText;
				this.dataGrid2.CaptionBackColor = SystemColors.ActiveCaptionText;
				this.dataGrid2.CaptionVisible = false;
				this.dataGrid2.DataMember = "";
				this.dataGrid2.Dock = DockStyle.Fill;
				this.dataGrid2.HeaderForeColor = SystemColors.ControlText;
				this.dataGrid2.Name = "dataGrid2";
				this.dataGrid2.ReadOnly = true;
				this.dataGrid2.Size = new System.Drawing.Size (696, 307);
				this.dataGrid2.TabIndex = 6;
				this.dataGrid2.MouseUp += new MouseEventHandler (this.dataGrid2_MouseUp);
				base.AcceptButton = ((IButtonControl) this.btExit);
				this.AutoScaleBaseSize = new System.Drawing.Size (7, 16);
				base.ClientSize = new System.Drawing.Size (730, 459);
				theControlArray4 = new Control[12];
				theControlArray4[0] = ((Control) this.tbControl);
				theControlArray4[1] = ((Control) this.tbGoTo);
				theControlArray4[2] = ((Control) this.btLast);
				theControlArray4[3] = ((Control) this.btFirst);
				theControlArray4[4] = ((Control) this.rbAll);
				theControlArray4[5] = ((Control) this.btExit);
				theControlArray4[6] = ((Control) this.btSearch);
				theControlArray4[7] = ((Control) this.tbKeySearch);
				theControlArray4[8] = ((Control) this.label3);
				theControlArray4[9] = ((Control) this.rbTenBenhNhan);
				theControlArray4[10] = ((Control) this.rbID);
				theControlArray4[11] = ((Control) this.label2);
				base.Controls.AddRange (theControlArray4);
				this.Font = new System.Drawing.Font ("Verdana", 9.75F, FontStyle.Regular, GraphicsUnit.Point, ((byte) byte.MinValue));
				base.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
				base.Icon = ((System.Drawing.Icon) theResourceManager.GetObject ("$this.Icon"));
				base.MaximizeBox = false;
				base.MinimizeBox = false;
				base.Name = "frmBenhAnChuaTinhTien";
				base.StartPosition = FormStartPosition.CenterScreen;
				this.Text = "Thanh To?n";
				base.TopMost = true;
				base.Load += new EventHandler (this.frmTimHoSoBenhAn_Load);
				this.tbControl.ResumeLayout (false);
				this.tbHoaDon.ResumeLayout (false);
				((ISupportInitialize) this.dataGrid1).EndInit ();
				this.tbCapNhatHoaDon.ResumeLayout (false);
				((ISupportInitialize) this.dataGrid2).EndInit ();
				base.ResumeLayout (false);
				return;
			}
			
			public bool IsNumber (string Number)
			
			{
				bool theBoolean;
				
			L_0000:
				try
				{
					long theLong = long.Parse (Number);
					theBoolean = true;
				}
				catch
				{
					
				L_000B:
					
					{
					}
					theBoolean = false;
				}
				
			L_0010:
				
				{
				}
				return theBoolean;
			}
			
			public void loadDataGrid (DataGrid dg)
			
			{
				DataGridTableStyle theDataGridTableStyle;
				DataGridTextBoxColumn theDataGridTextBoxColumn;
				DataGridTextBoxColumn theDataGridTextBoxColumn2;
				DataGridTextBoxColumn theDataGridTextBoxColumn3;
				DataGridTextBoxColumn theDataGridTextBoxColumn4;
				DataGridTextBoxColumn theDataGridTextBoxColumn5;
				DataGridTextBoxColumn theDataGridTextBoxColumn6;
				DataGridTextBoxColumn theDataGridTextBoxColumn7;
				theDataGridTableStyle = new DataGridTableStyle ();
				theDataGridTableStyle.MappingName = "vw_NursePayment";
				theDataGridTableStyle.AlternatingBackColor = Color.AliceBlue;
				theDataGridTableStyle.HeaderForeColor = Color.Maroon;
				theDataGridTableStyle.GridLineColor = Color.CornflowerBlue;
				theDataGridTextBoxColumn = new DataGridTextBoxColumn ();
				theDataGridTextBoxColumn.MappingName = "clrISN";
				theDataGridTextBoxColumn.HeaderText = "";
				theDataGridTextBoxColumn.Width = 0;
				int i = theDataGridTableStyle.GridColumnStyles.Add (((DataGridColumnStyle) theDataGridTextBoxColumn));
				theDataGridTextBoxColumn2 = new DataGridTextBoxColumn ();
				theDataGridTextBoxColumn2.MappingName = "patID";
				theDataGridTextBoxColumn2.HeaderText = "S? ID";
				theDataGridTextBoxColumn2.Width = 60;
				int i2 = theDataGridTableStyle.GridColumnStyles.Add (((DataGridColumnStyle) theDataGridTextBoxColumn2));
				theDataGridTextBoxColumn3 = new DataGridTextBoxColumn ();
				theDataGridTextBoxColumn3.MappingName = "patName";
				theDataGridTextBoxColumn3.HeaderText = "T?n B?nh Nh?n";
				theDataGridTextBoxColumn3.Width = 210;
				int i3 = theDataGridTableStyle.GridColumnStyles.Add (((DataGridColumnStyle) theDataGridTextBoxColumn3));
				theDataGridTextBoxColumn4 = new DataGridTextBoxColumn ();
				theDataGridTextBoxColumn4.MappingName = "patBirthDate";
				theDataGridTextBoxColumn4.HeaderText = "Ng?y Sinh";
				theDataGridTextBoxColumn4.Width = 100;
				int i4 = theDataGridTableStyle.GridColumnStyles.Add (((DataGridColumnStyle) theDataGridTextBoxColumn4));
				theDataGridTextBoxColumn5 = new DataGridTextBoxColumn ();
				theDataGridTextBoxColumn5.MappingName = "clrExaminationDate";
				theDataGridTextBoxColumn5.HeaderText = "Ng?y L?p B?nh ?n";
				theDataGridTextBoxColumn5.Width = 140;
				theDataGridTextBoxColumn5.NullText = string.Empty;
				int i5 = theDataGridTableStyle.GridColumnStyles.Add (((DataGridColumnStyle) theDataGridTextBoxColumn5));
				theDataGridTextBoxColumn6 = new DataGridTextBoxColumn ();
				theDataGridTextBoxColumn6.MappingName = "clrExaminationTimes";
				theDataGridTextBoxColumn6.HeaderText = "L?n Kh?m";
				theDataGridTextBoxColumn6.Width = 120;
				theDataGridTextBoxColumn6.NullText = string.Empty;
				int i6 = theDataGridTableStyle.GridColumnStyles.Add (((DataGridColumnStyle) theDataGridTextBoxColumn6));
				theDataGridTextBoxColumn7 = new DataGridTextBoxColumn ();
				theDataGridTextBoxColumn7.MappingName = "clrRexaminationTimes";
				theDataGridTextBoxColumn7.HeaderText = "L?n T?i Kh?m";
				theDataGridTextBoxColumn7.Width = 120;
				theDataGridTextBoxColumn7.NullText = string.Empty;
				int i7 = theDataGridTableStyle.GridColumnStyles.Add (((DataGridColumnStyle) theDataGridTextBoxColumn7));
				int i8 = dg.TableStyles.Add (theDataGridTableStyle);
				theDataGridTableStyle.AllowSorting = false;
				this.bmb = this.BindingContext[dg.DataSource, dg.DataMember];
				return;
			}
			
			private void tbGoTo_TextChanged (object sender, EventArgs e)
			
			{
				DataSet theDataSet;
				int i;
				theDataSet = new DataSet ();
				if (this.tbControl.SelectedIndex != 0)
				{
					goto L_0026;
				}
				theDataSet = ((DataSet) this.dataGrid1.DataSource);
				goto L_0037;
				
			L_0026:
				
				{
				}
				theDataSet = ((DataSet) this.dataGrid2.DataSource);
				
			L_0037:
				
				{
				}
				if (! this.IsNumber (this.tbGoTo.Text.ToString ()))
				{
					goto L_00C1;
				}
				i = 0;
				goto L_00A2;
				
			L_0053:
				
				{
				}
				if (theDataSet.Tables["vw_NursePayment"].Rows[i][1].ToString () != this.tbGoTo.Text.ToString ())
				{
					goto L_009E;
				}
				this.bmb.Position = i;
				goto L_00BF;
				
			L_009E:
				
				{
				}
				i++;
				
			L_00A2:
				
				{
				}
				if (i < theDataSet.Tables["vw_NursePayment"].Rows.Count)
				{
					goto L_0053;
				}
				
			L_00BF:
				
				{
				}
				goto L_00CC;
				
			L_00C1:
				
				{
				}
				this.tbGoTo.SelectAll ();
				
			L_00CC:
				return;
			}
			
			private void tbKeySearch_KeyPress (object sender, KeyPressEventArgs e)
			
			{
				if (e.KeyChar != '\r')
				{
					goto L_0012;
				}
				this.btSearch_Click (sender, ((EventArgs) e));
				
			L_0012:
				return;
			}
			
		#endregion
	}
	
}

